package com.sc.nft.service;


import com.sc.nft.dto.MallActivitySpecsGetSendCodeDTO;
import com.sc.nft.entity.MallActivitySpecs;

import java.math.BigDecimal;
import java.util.List;

/**
 * IP商城活动规格表服务接口
 *
 * @author zxy
 * @description IP商城
 * @since 2023-05-10 16:59:01
 */
public interface MallActivitySpecsService {

    /**
     * 根据id查询
     *
     * @param specsId
     * @return
     */
    MallActivitySpecs getById(Long specsId);

    /**
     * 根据商品活动id查询
     *
     * @param activityId
     * @return
     */
    List<MallActivitySpecs> getByActivityId(Long activityId);

    /**
     * 冻结库存
     *
     * @param id
     * @param count
     * @return
     */
    Boolean frozenStockByIdAndCount(Long id, Integer count);


    /**
     * 冻结库存释放
     *
     * @param id
     * @param count
     * @return
     */
    Boolean subFrozenCount(Long id, Integer count);

    /**
     * 冻结消费库存
     *
     * @param id
     * @param count
     * @return
     */
    Boolean frozenConsumeStockByIdAndCount(Long id, Integer count);

    /**
     * 出入库存
     *
     * @param addCount 添加库存数量
     * @return
     */
    Boolean updateUsableStockCountById(Long id, Integer addCount);

    /**
     * 修改活动销售价格
     *
     * @param id
     * @param salesPrice
     * @return
     */
    void updateMallActivitySalesPriceById(Long id, BigDecimal salesPrice, BigDecimal profit);

    /**
     * 根据id查询
     *
     * @param activitySpecsId
     * @return
     */
    MallActivitySpecs getByIdWithoutDeleted(Long activitySpecsId);

    /**
     * 根据规格id获取发货编码
     * @param activitySpecsIdList
     * @return
     */
    List<MallActivitySpecsGetSendCodeDTO> getSendCodeByActivitySpecsIdList(List<Long> activitySpecsIdList);
}
